public class test_5 {
    public static void main(String[] args) {
        int n = 10;
        int sum = 0;
        int number = 8;

        for (int i = 1; i <= n; i++) {
            sum += number;
            number = number * 10 + 8;
        }

        System.out.println(sum);
    }
}